package br.com.neb.caronamanager.model;

import java.util.Date;

public class Carona {

	private Integer id;
	private Integer date;
	private String driver;
	private int roundTrip;
	
	public Carona() {}
	public Carona(Integer date, String driver, int roundTrip) {
		super();
		this.date = date;
		this.driver = driver;
		this.roundTrip = roundTrip;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getDate() {
		return date;
	}
	public void setDate(Integer date) {
		this.date = date;
	}
	public String getDriver() {
		return driver;
	}
	public void setDriver(String driver) {
		this.driver = driver;
	}
	public int getRoundTrip() {
		return roundTrip;
	}
	public void setRoundTrip(int roundTrip) {
		this.roundTrip = roundTrip;
	}
	
	@Override
	public String toString() {
		return "Date: " + new Date((getDate()*1000)*-1).toString()+"\nDriver: " + getDriver() +"\nRoundTrip: " + (getRoundTrip()==1?"yes":"no");
	}
	
}
